using System;
namespace Servlets.Server
{
	public interface IListener : IDisposable
	{
		/// <summary>
		/// Starts the listener so it can start accepting clients
		/// </summary>
		void Start();
		
		/// <summary>
		/// Blocks until a connection is established. Returns an IClient to communicate with the connected client.
		/// The Start() must be called first.
		/// </summary>
		/// <returns>
		/// A <see cref="IClient"/> to communicate with.
		/// </returns>
		IClient AcceptClient();
		
	}
}

